﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Help;
using Model;
namespace BLLA
{
    public partial class Order_FlowInt_T : BaseBLL<Model.Order_FlowInt_T>, IBLL.IOrder_FlowInt_TBLL
    {
        ObjectSerialize os = new ObjectSerialize();
        DataResult result = new DataResult();
        public string GetOrder_FlowInt(int pageIndex, int pageSize, string MerID, string YZM, int RETID)
        {
            #region 匹配验证码
            if (YZM != Help.ALL_DataV.YZM)
            {
                result.BS = "-88";
                result.Msg = "验证码错误！";
                return os.StringOfObject(result, RETID);
            }
            #endregion
            #region 业务层
            List<Model.View_Order_FlowInt> mo = new List<Model.View_Order_FlowInt>();
            try
            {
                mo = base.DBSession.IView_Order_FlowIntDAL.GetListBy("SELECT * FROM View_Order_FlowInt where MerID='"+MerID+"'");
            }
            catch (Exception)
            {
                result.BS = "-1";
                result.Msg = "查询不到用户！";
                return os.StringOfObject(result, RETID);
            }
            result.BS = "1";
            result.Msg = "查询成功！";
            result.total = mo.Count;
            result.rows = mo.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList()
;

            return os.StringOfObject(result, RETID);
            #endregion
        }
    }
}
